package com.State;

public class DeadState extends ThreadState {
    public DeadState() {
        state = StateSet.DEAD;
        System.out.println("死亡状态");
    }

    public void dead(ThreadContext tc) {
        System.out.println("调用了dead方法");
        if (state == StateSet.DEAD)
            tc.setThreadState(new RunnableState());
        else
            System.out.println("当前线程不是死亡状态");
    }
}
